#ifndef __INTEGRATEFXP_H__
#define __INTEGRATEFXP_H__

/** 
 * \brief Integrator
 *
 * Fixed sampling frequency 128Hz
 *
 * \ingroup Control
 *
 * \param[in] x input
 * \param z internal state
 *
 * \return L1_INT32 integrator
 */
static __inline L1_INT32 integrateFXP(L1_INT32 x, L1_INT32* z)
{
    *z += x;
    return *z >> 7;
}

#endif // __INTEGRATEFXP_H__
